home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
M-More Monthly Disks
/
(c)ma.d64
/
funny car.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
4KB
|
126 lines
1 POKE53281,15:POKE53280,6
2 V=54296:W=54276:A=54277:S=54278:HF=54273:LF=54272:POKEHF,12:POKELF,216
4 POKEHF+14,68:POKELF+14,149
5 PRINT"[147][144] FUNNYCAR[146]"
6 PRINT" BY MARK LEVORSON"
10 PRINT"IF YOU'RE A CAR ENTHUSIAST,"
20 PRINT"YOU'VE PROBABLY WONDERED WHAT IT'S"
30 PRINT"LIKE TO DRIVE A 1500 H.P. FUNNY CAR."
40 PRINT"WELL NOW IS YOUR CHANCE!"
42 PRINT"YOU HAVE TO SURVIVE USING ONLY YOUR"
44 PRINT"QUICK REFLEXES."
50 PRINT"YOU MUST:"
60 PRINT"1. SHIFT GEARS FOR MAXIMUM SPEED"
65 PRINT" (REDLINE BETWEEN 8000-10000 R.P.M.)"
70 PRINT"2. WATCH THE OIL PRESSURE"
75 PRINT" (PRESSURE BELOW 50 PSI IS DANGEROUS)"
80 PRINT"3. NOT[146] REDLIGHT AT THE START"
85 PRINT" (A GOOD START IS ESSENTIAL)"
90 PRINT"HIT Y[146] FOR INSTRUCTIONS";
100 GET K$:IF K$="" THEN 100
101 IF K$<>"Y" THEN 127
102 PRINT"[147] INSTRUCTIONS[146]"
104 PRINT"1. USE F 1[146], F 3[146], F 5[146] AND F 7[146]"
106 PRINT" TO SHIFT GEARS."
108 PRINT"2. PRESSING F 1[146] BEFORE GREEN LIGHT"
110 PRINT" COMES ON RESULTS IN DISQUALIFICATION."
112 PRINT"3. PENALTY INDICATES TIME TAKEN TO"
114 PRINT" PRESS F 1[146] AFTER GREEN LIGHT, AND"
116 PRINT" REDUCES ACCELERATION."
117 PRINT"4. THE MAXIMUM R.P.M. IS RANDOMLY"
118 PRINT" CALCULATED BETWEEN 8000-10000"
119 PRINT"5. THE CHRISTMAS TREE LIGHTS START"
120 PRINT" AUTOMATICALLY SO BE READY."
121 PRINT"6. HIT Q[146] WHEN RED LIGHT TO QUIT"
122 PRINT"HIT RETURN[146] TO ENTER THE EXCITING WORLD"
124 PRINT"OF DRAG RACING, GOOD LUCK!";
126 GET K$:IF K$<>CHR$(13) THEN 126
127 PRINT"[147]":PRINTTAB(30)"GEARBOX[146]"
128 PRINTTAB(7)"[209][144][192][174][176][192][209][144]";:PRINTTAB(28)"[176][192][192][192][192][192][192][192][192][192][174]"
130 PRINTTAB(8)" [194][194] ";:PRINTTAB(28)"[194]1ST - F 1[194]"
140 PRINTTAB(7)"[209][144][192][194][194][192][209][144]";:PRINTTAB(28)"[173][192][192][192][192][192][192][192][192][192][189]"
150 PRINTTAB(8)" [194][194] ";:PRINTTAB(28)"[176][192][192][192][192][192][192][192][192][192][174]"
160 PRINTTAB(7)"[209][144][195][194][194][195][209][144]";:PRINTTAB(28)"[194]2ND - F 3[194]"
170 PRINTTAB(8)" [194][194] ";:PRINTTAB(28)"[173][192][192][192][192][192][192][192][192][192][189]"
180 PRINTTAB(7)"[209][144][192][194][194][192][209][144]";:PRINTTAB(28)"[176][192][192][192][192][192][192][192][192][192][174]"
190 PRINTTAB(8)" [194][194] ";:PRINTTAB(28)"[194]3RD - F 5[194]"
200 PRINTTAB(7)"[209][144][192][194][194][192][209][144]";:PRINTTAB(28)"[173][192][192][192][192][192][192][192][192][192][189]"
210 PRINTTAB(8)" [194][194] ";:PRINTTAB(28)"[176][192][192][192][192][192][192][192][192][192][174]"
220 PRINTTAB(7)"[209][144][192][194][194][192][209][144]";:PRINTTAB(28)"[194]4TH - F 7[194]"
230 PRINTTAB(8)" [194][194] ";:PRINTTAB(28)"[173][192][192][192][192][192][192][192][192][192][189]"
235 TM=500:POKEV,15:MAX=0
240 PRINT"WHEN GREEN LIGHT COMES ON,":PRINT"PRESS F 1[146] TO START"
245 PRINT" [146][144][145]"
250 PRINT"[144] SPEEDOMETER[146] TACHOMETER[146] OIL PRESS[146]"
260 PRINT" M.P.H.[146] R.P.M.[146] P.S.I.[146]"
280 PRINT" [209][209]"
300 PRINT" [209][209]"
310 FOR T=1 TO (TM*5):NEXT T
315 GET K$:IF K$<>"" AND K$<>"Q" THEN 315
317 IF K$="Q" THEN 2300
320 PRINT"[145] [209][209]"
326 PRINT" "
328 PRINT" "
329 PRINT"[144] 0 1000 75 "
330 PRINT""
333 FOR Y=1 TO 4
335 GOSUB 3000
340 PRINT"[158] [209][209]"
350 FOR T=1 TO TM:NEXT T
360 PRINT"[145] [209][209]"
370 NEXT Y
372 GET K$:IF K$="" THEN 379
375 IF K$="[133]" THEN PRINT" DISQUALIFIED[146]":GOTO 280
377 GOTO 372
379 GOSUB 3000
380 PRINT" [209][209][144]"
470 PEN=0
480 GET K$:IF K$<>CHR$(133) THEN:PEN=PEN+0.01:GOTO 480
490 IF PEN>0.5 THEN PEN=0.5
497 PRINT" PENALTY=[144]"PEN
500 PRINT""
650 TQ=400:ACC=3-PEN:KEY=134:OIL=75:MPH=0
700 FOR GEAR=1 TO 4
720 POKES+7,240:POKEW+7,33:SN=0:SM=2
800 RPM=INT((2000-TQ)*RND(1))+8000+TQ
900 FOR N=1000 TO RPM STEP TQ
920 SN=SN+INT(ACC*10):IF SN>255 THEN SN=0:SM=SM+1
940 POKELF+7,SN:POKEHF+7,SM
1000 OIL=OIL+(INT(3*RND(1))-1)
1100 PRINT" ";
1200 IF MPH>=10 THEN PRINT"[157]";
1300 IF MPH>=100 THEN PRINT"[157]";
1350 IF N<8000 THEN PRINT" "INT(MPH)" "N" "OIL"[145]":GOTO 1500
1400 IF N>=8000 THEN PRINT" "INT(MPH)" "N"[144] "OIL"[145]"
1500 MPH=MPH+ACC
1600 GET K$
1700 IF K$=CHR$(KEY) THEN 2000
1800 NEXT N
1900 IF OIL<50 OR GEAR <> 4 THEN 2060
2000 ACC=ACC-0.7:KEY=KEY+1:TQ=TQ-100:POKEA+7,0:POKES+7,0:POKEW+7,0:NEXT GEAR
2050 GOTO 2200
2060 POKEA,0:POKES,0:POKEW,0:POKEA+7,0:POKES+7,0:POKEW+7,0
2070 POKEA,42:POKES,0:POKEW,129
2100 PRINT"[145][145][145][145][145][145] BLOWN ENGINE[144][146] @"N-TQ"R.P.M.";
2110 IF GEAR=1 THEN PRINT", 1ST GEAR"
2120 IF GEAR=2 THEN PRINT", 2ND GEAR"
2130 IF GEAR=3 THEN PRINT", 3RD GEAR"
2150 GOTO 280
2200 PRINT"[145][145][145][145][145][145] RATING[146] ":MPH=INT(MPH-ACC-0.7)
2201 IF MPH>MAX THEN MAX=MPH
2202 PRINT" ";
2205 IF MPH>260 THEN PRINTMPH"MPH - EXPERT, DON GARLITS BEWARE! ":GOTO 280
2210 IF MPH>250 THEN PRINTMPH"MPH - PROFESSIONAL ":GOTO 280
2220 IF MPH>240 THEN PRINTMPH"MPH - AMATEUR ":GOTO 280
2230 IF MPH>230 THEN PRINTMPH"MPH - NOVICE ":GOTO 280
2240 IF MPH>220 THEN PRINTMPH"MPH - GRANNY ":GOTO 280
2250 IF MPH>210 THEN PRINTMPH"MPH - GRANNY IN THE MAKING ":GOTO 280
2260 IF MPH<=210 THEN PRINTMPH"MPH - WE OFFER LESSONS! ":GOTO 280
2300 PRINT"[144] GAME OVER[146] "
2400 PRINT" TOP SPEED"MAX"[157] M.P.H. ":END:STOP
3000 POKEA+14,0:POKEW+14,0:POKES+14,0
3100 POKEW+14,33
3200 POKEA+14,24
3300 POKES+14,0
3400 RETURN